﻿#ifndef RFIDMONITORCOMMAND_H
#define RFIDMONITORCOMMAND_H

#include "/rapidjson/AIGCJson.hpp"

using namespace std;
using namespace aigc;

class RelatedLabelsBody
{
public:
    string cardID;
    string name;
    int    cellNo;
    string rfidLabel;

    AIGC_JSON_HELPER(cardID, name, cellNo, rfidLabel)
};

class RfidDataBody
{
public:
    int layerNo;
    list<RelatedLabelsBody> labels;

    AIGC_JSON_HELPER(layerNo, labels)
};

/**
 * @brief 服务端发给设备端的Rfid监控命令报文(UDP, 服务端->设备端)
 */
class ControlCommand
{
public:
    string cmdType = "ENTRY_CAB";
    string requestNo;
    int    deviceNo;
    list<RfidDataBody> rfidData;

    AIGC_JSON_HELPER(cmdType, requestNo, deviceNo, rfidData)
};

#endif // RFIDMONITORCOMMAND_H
